package com.sgb.kjwl.view.ui.adapter;


import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.transport.SingleItemEntity;
import com.sgb.kjwl.utils.DefaultUtil;
import com.swgk.core.customview.SeeMoreView;

import java.util.List;

/**
 * @author: 杨畔
 * @date: 2020/12/29 16:59
 * @Description: 发布货源更多信息适配器
 */
public class CargoMoreAdapter extends BaseQuickAdapter<SingleItemEntity, BaseViewHolder> {
    public CargoMoreAdapter(@Nullable List<SingleItemEntity> data) {
        super(R.layout.item_cargo_more, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SingleItemEntity item) {
        helper.setText(R.id.tv_item_cargo_more_title, DefaultUtil.getString(item.getLeftString()))
                .addOnClickListener(R.id.ll_item_cargo_more);
        //设置内容
        SeeMoreView moreView = helper.getView(R.id.tv_item_cargo_more_content);
        moreView.setText(DefaultUtil.getString(item.getRightString()));
    }
}
